package com.mq.servcie;

import org.springframework.cloud.stream.annotation.Input;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;
import org.springframework.stereotype.Component;

/**
 * Created by Administrator on 2017/8/29 0029.
 * 自定义消息管道
 */
@Component
public interface MyChannel {
    String INPUT_ORDER = "inputOrder";
    String OUTPUT_ORDER = "outputOrder";

    /**
     * 接收订单消息
     * @return
     */
    @Input(INPUT_ORDER)
    SubscribableChannel inputOrder();

    /**
     * 发送订单消息
     * @return
     */
    @Output(OUTPUT_ORDER)
    MessageChannel outputOrder();
}
